package com.gree.elasticsearch.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 总有刁民想害朕，请叫我小花狗
 * create by zxw on 2020/5/28
 */
@RestController
@RequestMapping("/image")
public class ImageController {
    private Logger log = LoggerFactory.getLogger(ImageController.class.getName());
    @PostMapping
    public String uploadImage(@RequestParam("image")MultipartFile multipartFile) {
        String originFileName = multipartFile.getOriginalFilename();
        log.debug("tensflow upload image, and image name is {}", originFileName);
        return originFileName;
    }
}


